<script type="text/javascript">
    function addCateTreeNodeClick(event, treeId, treeNode) {
        var zTree = $.fn.zTree.getZTreeObj(treeId);
        zTree.checkNode(treeNode, !treeNode.checked, true, true);
        event.preventDefault();
    }

    function addCateTreeNodeCheck(event, treeId, treeNode) {
        var form = $.CurrentNavtab.find("#addArticleForm");
        form.find("input[name='cate_name']").val(treeNode["name"]);
        form.find("input[name='cate_id']").val(treeNode["id"]);
    }

    function thumbUploadSuccess(file, data) {
        var data = $.parseJSON(data);
        $(this).bjuiajax("ajaxDone", data);
        if (data["statusCode"] == 200) {
            $.CurrentNavtab.find("#thumb").val(data["data"]["filename"]);
            $.CurrentNavtab.find("#thumbImg").html("<img src='" + data["data"]["filename"] + "' width='100' />");
        }
    }
</script>
<style>
    #addArticleForm table td.x85 {width:85px;text-align:right;}
</style>
<div class="bjui-pageContent">
    <form id="addArticleForm" action="{:U('Admin/News/addNews')}" data-toggle="validate" data-alertmsg="false">
        <table class="table table-condensed table-hover" width="100%">
            <tbody>
                <tr>
                    <td class="x85">
                        <label for="title" class="control-label x85">标题：</label>
                    </td>
                    <td>
                        <input type="text" name="title" id="title" value="" data-rule="required" size="20">
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="description" class="control-label x85">描述：</label>
                    </td>
                    <td>
                        <textarea name="description" id="description" rows="5" cols="80"></textarea>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="content" class="control-label x85">内容：</label>
                    </td>
                    <td>
                        <textarea name="content" id="content" style="width:800px;" data-toggle="kindeditor" data-minheight="200"></textarea>
                    </td>
                </tr>
            </tbody>
        </table>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close" data-icon="close">取消</button></li>
        <li><button type="submit" class="btn-default" data-icon="save">添加</button></li>
    </ul>
</div>